#ifndef __MOTOR_H
#define __MOTOR_H
#include "ti_msp_dl_config.h"

#define F		0
#define Z		1
#define S		2

#define L		3
#define R		4


extern volatile float TAR_Lspeed,TAR_Rspeed;
extern volatile int Encode_L,Encode_R;

void MOTOR_Init(void);
void MOTOR_Stop(void);
void Set_direction(unsigned char Ldir,unsigned char Rdir);
void MOTOR_Target_Speed(float lspeed,float rspeed);
void MOTOR_Duty_Speed(int lspeed,int rspeed);
int Get_Encode(unsigned char LR);
#endif
